<?php

class Fencer_Controller_Action extends Zend_Controller_Action
{
	public function preDispatch(){
		parent::preDispatch();
	
		$auth  = Zend_Auth::getInstance();
		$dados = $auth->getStorage()->read();
	
		if(!$auth->hasIdentity()){
			$session = Fencer_Utils::getZendSession();
			$session->mensagem = "<strong>Acesso negado.</strong>";
			$this->_redirect('/login');
			
		}elseif($dados['flg_primeiro_acesso']){
			$this->_redirect('login/primeiro-acesso');
			
		}
		
		$this->_helper->layout->setLayout('layout');
	}
	
	public function indexAction(){}
	
	public function formularioAction(){}
	
	public function gravarAction(){}
	
	public function excluirAction(){}

	protected function _getModel(){}
	
}